// 根据地图当前展示点位的设备和状态,判断是否显示新增点位
function devMapShowFunc(unit, levelisk, appearPeople, telephone, cameraUrl, streamServer, waterGage, chargingInterfaceNumber, numberOfChargedVehicles, orgName, fireCount, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4) {

  var deviceName = $('#addDeviceForm input[name="deviceName"]').val();
  var usestatus = $("#addDeviceForm select[name='usestatus']").val();
  var devCode = $('#addDeviceForm input[name="devCode"]').val();
  var address = $('#addDeviceForm input[name="address"]').val();
  var fixedPlace = $('#addDeviceForm input[name="fixedPlace"]').val();
  var latitude = $('#addDeviceForm input[name="latitude"]').val();
  var longitude = $('#addDeviceForm input[name="longitude"]').val();
  var installationDate = $('#addDeviceForm input[name="installationDate"]').val();
  var deadline = $('#addDeviceForm input[name="deadline"]').val();
  var linkMain1 = $('#addDeviceForm input[name="linkMain1"]').val();
  var linkMain2 = $('#addDeviceForm input[name="linkMain2"]').val();
  var linkMain3 = $('#addDeviceForm input[name="linkMain3"]').val();
  var linkPhone1 = $('#addDeviceForm input[name="linkPhone1"]').val();
  var linkPhone2 = $('#addDeviceForm input[name="linkPhone2"]').val();
  var linkPhone3 = $('#addDeviceForm input[name="linkPhone3"]').val();
  var remark = $('#addDeviceForm input[name="remark"]').val();
  var fireCount = $('#addDeviceForm input[name="fireCount"]').val();
  var chargingInterfaceNumber = $('#addDeviceForm input[name="chargingInterfaceNumber"]').val();
  var manufacturer = $('#addDeviceForm input[name="manufacturer"]').val();
  var waterGage = $('#addDeviceForm input[name="waterGage"]').val();
  var waterLevel = $('#addDeviceForm input[name="waterLevel"]').val();
  var urrentMarginThreshold = $('#addDeviceForm input[name="urrentMarginThreshold"]').val();
  var temperatureThreshold = $('#addDeviceForm input[name="temperatureThreshold"]').val();
  var cameraUrl = $('#addDeviceForm input[name="cameraUrl"]').val();
  var streamServer = $('#addDeviceForm input[name="streamServer"]').val();
  var deviceTypeId = $('#addDeviceForm .deviceTypeIdVal').val();

  if ((devTypeId == 1 && devTypeStatus == 7) || (devTypeId == 1 && devTypeStatus == '') || (devTypeId == 'all')) {
    smokeMarker.push(BaiDuMap.addMarker(fireCount, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
  } else if ((devTypeId == 2 && devTypeStatus == 10) || (devTypeId == 2 && devTypeStatus == '') || (devTypeId == 'all')) {
    chargeMarker.push(BaiDuMap.chargeAddMarker(chargingInterfaceNumber, numberOfChargedVehicles, orgName, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
  } else if ((devTypeId == 3) || (devTypeId == 3 && devTypeStatus == '') || (devTypeId == 'all')) {
    GPSMarker.push(BaiDuMap.GPSAddMarker(fireCount, status, devCode, deviceName, address, longitude, latitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
  } else if ((devTypeId == 4 && devTypeStatus == 30) || (devTypeId == 4 && devTypeStatus == '') || (devTypeId == 'all')) {
    fireplugMarker.push(BaiDuMap.fireplugAddMarker(waterGage, orgName, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
  } else if ((devTypeId == 5 && devTypeStatus == 60) || (devTypeId == 5 && devTypeStatus == '') || (devTypeId == 'all')) {
    electricityMarker.push(BaiDuMap.electricityAddMarker( status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
  } else if ((devTypeId == 6 && devTypeStatus == 50) || (devTypeId == 6 && devTypeStatus == '') || (devTypeId == 'all')) {
    waterMarker.push(BaiDuMap.waterAddMarker(status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
  } else if ((devTypeId == 7 && devTypeStatus == 70) || (devTypeId == 7 && devTypeStatus == '') || (devTypeId == 'all')) {
    videoMarker.push(BaiDuMap.videoAddMarker(cameraUrl, streamServer, orgName, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
  } else if ((devTypeId == 'keepWatch') || (devTypeId == 'keepWatch' && devTypeStatus == '')) {
    keepMarker.push(BaiDuMap.videoAddMarker(status, devCode, deviceName, address, longitude, latitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
  } else if ((devTypeId == 'earlyWarning' && devTypeStatus == 1) || (devTypeId == 'earlyWarning' && devTypeStatus == '')) {
    earlyWarningMarker.push(BaiDuMap.earlyWarningAddMarker(unit, levelisk, appearPeople, telephone, latitude, longitude, devCode, deviceName, address, orgName));
  }
}

// 添加或修改设备时更新地图点位
function scoketDevMapShowFunc(deviceTypeId, cameraUrl, streamServer, waterGage, chargingInterfaceNumber, numberOfChargedVehicles, orgName, fireCount, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4) {
  // var deviceTypeId = deviceTypeId.substr(2,1);
  console.log('------'+devTypeId+'------'+ deviceTypeId+'------'+devTypeStatus+'------'+status+'------');
  if (deviceTypeId == '001') {
    map.closeInfoWindow();
    deleteDevPoint(deviceTypeId, devCode);
    smokeMarker.push(BaiDuMap.addMarker(fireCount, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    console.log(smokeMarker[length])
    smokeMarker[smokeMarker.length - 1].hideOver();
  } else if (deviceTypeId == '002') {
    map.closeInfoWindow();
    deleteDevPoint(deviceTypeId, devCode);
    chargeMarker.push(BaiDuMap.chargeAddMarker(chargingInterfaceNumber, numberOfChargedVehicles, orgName, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    chargeMarker[chargeMarker.length - 1].hideOver();
  } else if (deviceTypeId == '003') {
    map.closeInfoWindow();
    deleteDevPoint(deviceTypeId, devCode);
    GPSMarker.push(BaiDuMap.GPSAddMarker(fireCount, status, devCode, deviceName, address, longitude, latitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    GPSMarker[GPSMarker.length - 1].hideOver();
  } else if (deviceTypeId == '004') {
    map.closeInfoWindow();
    deleteDevPoint(deviceTypeId, devCode);
    fireplugMarker.push(BaiDuMap.fireplugAddMarker(waterGage, orgName, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    fireplugMarker[fireplugMarker.length - 1].hideOver();
  } else if (deviceTypeId == '005') {
    map.closeInfoWindow();
    deleteDevPoint(deviceTypeId, devCode);
    electricityMarker.push(BaiDuMap.electricityAddMarker( status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    electricityMarker[electricityMarker.length - 1].hideOver();
  } else if (deviceTypeId == '006') {
    map.closeInfoWindow();
    deleteDevPoint(deviceTypeId, devCode);
    waterMarker.push(BaiDuMap.waterAddMarker(status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    waterMarker[waterMarker.length - 1].hideOver();
  } else if (deviceTypeId == '007') {
    map.closeInfoWindow();
    deleteDevPoint(deviceTypeId, devCode);
    videoMarker.push(BaiDuMap.videoAddMarker(cameraUrl, streamServer, orgName, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    videoMarker[videoMarker.length - 1].hideOver();
  } else if (deviceTypeId == 'keepWatch') {
    map.closeInfoWindow();
    deleteDevPoint(deviceTypeId, devCode);
    keepMarker.push(BaiDuMap.keepAddMarker('keep', devCode, deviceName, address, longitude, latitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    keepMarker[keepMarker.length - 1].hideOver();
  }
  console.log(devTypeId == 5 && devTypeStatus == '')
  if ((devTypeId == 1 && devTypeStatus == status) || (devTypeId == 1 && devTypeStatus == '') || (devTypeId == 'all')) {
    // smokeMarker.push(BaiDuMap.addMarker(fireCount, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));

    smokeMarker[smokeMarker.length - 1].showOver();
  } else if ((devTypeId == 2 && devTypeStatus == status) || (devTypeId == 2 && devTypeStatus == '') || (devTypeId == 'all')) {
    // chargeMarker.push(BaiDuMap.chargeAddMarker(chargingInterfaceNumber, numberOfChargedVehicles, orgName, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    chargeMarker[chargeMarker.length - 1].showOver();
  } else if ((devTypeId == 3) || (devTypeId == 3 && devTypeStatus == '') || (devTypeId == 'all')) {
    // GPSMarker.push(BaiDuMap.GPSAddMarker(fireCount, status, devCode, deviceName, address, longitude, latitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    GPSMarker[GPSMarker.length - 1].showOver();
  } else if ((devTypeId == 4 && devTypeStatus == status) || (devTypeId == 4 && devTypeStatus == '') || (devTypeId == 'all')) {
    // fireplugMarker.push(BaiDuMap.fireplugAddMarker(waterGage, orgName, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    fireplugMarker[fireplugMarker.length - 1].showOver();
  } else if ((devTypeId == 5 && devTypeStatus == status) || (devTypeId == 5 && devTypeStatus == '') || (devTypeId == 'all')) {
    // electricityMarker.push(BaiDuMap.electricityAddMarker( status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    
    electricityMarker[electricityMarker.length - 1].showOver();
  } else if ((devTypeId == 6 && devTypeStatus == status) || (devTypeId == 6 && devTypeStatus == '') || (devTypeId == 'all')) {
    // waterMarker.push(BaiDuMap.waterAddMarker(status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    waterMarker[waterMarker.length - 1].showOver();
  } else if ((devTypeId == 7 && devTypeStatus == status) || (devTypeId == 7 && devTypeStatus == '') || (devTypeId == 'all')) {
    // videoMarker.push(BaiDuMap.videoAddMarker(cameraUrl,streamServer,orgName, status, devCode, deviceName, address, latitude, longitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    videoMarker[videoMarker.length - 1].showOver();
  } else if ((devTypeId == 'keepWatch') || (devTypeId == 'keepWatch' && devTypeStatus == '')) {
    // keepMarker.push(BaiDuMap.videoAddMarker( status, devCode, deviceName, address, longitude, latitude, linkMain1, linkPhone1, linkMain2, linkPhone2, linkMain3, linkPhone3, linkMain4, linkPhone4));
    keepMarker[keepMarker.length - 1].showOver();
  }

}
// 添加或修改巡更点位时更新地图点位
function scoketKeepMapShowFunc(deviceTypeId,deviceName, devCode,  address, longitude, latitude) {
  if (deviceTypeId == 'keepWatch') {
    map.closeInfoWindow();
    // deleteDevPoint('keep', devCode);
    for (var i = 0; i < keepMarker.length; i++) {
      if (keepMarker[i].devCode == devCode) {
        keepMarker[i].removePoint();
      }
    }
    keepMarker.push(BaiDuMap.keepAddMarker('keep', deviceName, devCode, address, latitude, longitude));
    keepMarker[keepMarker.length - 1].hideOver();
  }
  if ((devTypeId == 'keepWatch') || (devTypeId == 'keepWatch' && devTypeStatus == '')) {
    keepMarker[keepMarker.length - 1].showOver();
  }
}
// 删除巡更点位时更新地图点位
function scoketKeepMapDelFunc( devCode) {
    // deleteDevPoint('keep', devCode);
    for (var i = 0; i < keepMarker.length; i++) {
      if (keepMarker[i].devCode == devCode) {
        keepMarker[i].removePoint();
      }
    }

}

// 添加或修改三色预警时更新地图点位
function scoketEarlyWaringMapShowFunc(unit, levelisk, appearPeople, telephone, latitude, longitude, onlyValue, address, orgName) {
  if(devTypeId == 'earlyWarning'){
    map.closeInfoWindow();
    BaiDuMap.deletePoint(onlyValue);
    earlyWarningMarker.push(BaiDuMap.earlyWarningAddMarker(unit, levelisk, appearPeople, telephone, latitude, longitude, onlyValue, address, orgName));
    earlyWarningMarker[earlyWarningMarker.length - 1].hideOver();
  }
  if ((devTypeId == 'earlyWarning' && devTypeStatus == 1) || (devTypeId == 'earlyWarning' && devTypeStatus == '')) {
    earlyWarningMarker[earlyWarningMarker.length - 1].showOver();
  }
}
// 删除地图设备点位
function deleteDevPoint(deviceTypeId, devCode) {
  console.log(deviceTypeId, devCode);
  map.closeInfoWindow();
  if (deviceTypeId == '001') {
    for (var i = 0; i < smokeMarker.length; i++) {
      if (smokeMarker[i].devCode == devCode) {
        smokeMarker[i].removePoint();
      }
    }
  } else if (deviceTypeId == '002') {
    for (var i = 0; i < chargeMarker.length; i++) {
      if (chargeMarker[i].devCode == devCode) {
        chargeMarker[i].removePoint();
      }
    }
  } else if (deviceTypeId == '003') {
    for (var i = 0; i < GPSMarker.length; i++) {
      if (GPSMarker[i].devCode == devCode) {
        GPSMarker[i].removePoint();
      }
    }
  } else if (deviceTypeId == '004') {
    for (var i = 0; i < fireplugMarker.length; i++) {
      if (fireplugMarker[i].devCode == devCode) {
        fireplugMarker[i].removePoint();
      }
    }
  } else if (deviceTypeId == '005') {
    for (var i = 0; i < electricityMarker.length; i++) {
      if (electricityMarker[i].devCode == devCode) {
        electricityMarker[i].removePoint();
      }
    }
  } else if (deviceTypeId == '006') {
    for (var i = 0; i < waterMarker.length; i++) {
      if (waterMarker[i].devCode == devCode) {
        waterMarker[i].removePoint();
      }
    }
  } else if (deviceTypeId == '007') {
    for (var i = 0; i < videoMarker.length; i++) {
      if (videoMarker[i].devCode == devCode) {
        videoMarker[i].removePoint();
      }
    }
  }
}
// 删除三色预警地图点位
function deleteEarlyWarningPoint(onlyValue){
  map.closeInfoWindow();
  for (var i = 0; i < earlyWarningMarker.length; i++) {
    if(earlyWarningMarker[i].devCode == onlyValue){
      earlyWarningMarker[i].removePoint();
    }
  }
}
// 删除巡更地图点位
function deleteKeepPoint(onlyValue){
  map.closeInfoWindow();
  for (var i = 0; i < keepMarker.length; i++) {
    if(keepMarker[i].devCode == onlyValue){
      keepMarker[i].removePoint();
    }
  }
}



// ==================
// 隐藏所有点位
function hideAllPiontFn() {
  // var earlyWarningMarker = [];
  // var chargeMarker = [];
  // var fireplugMarker = [];
  // var waterMarker = [];
  // var electricityMarker = [];
  // var GPSMarker = [];
  // var videoMarker = [];
  // var keepMarker = [];
  // var fireStationMarker = [];
  // var houseMasterMarker = [];
  // var buildingMarker = [];
  // var combinedActionMarker = [];
  // var combinedActionPointMarker = [];
  // var respondMarker = [];
  // var wallDoorMarker = [];
  // var sentryBoxMarker = [];
  // var apkMarker = [];
  // var keyPersonMarker = [];
  // 隐藏点位筛选框
  $('.index .pointPositionBox').hide();
  // 隐藏右侧图表
  $('.indexRight .indexRightHeight').hide();
  $('.earlyWarningChartsShow').hide();
  // 隐藏地图气泡框
  map.closeInfoWindow();

  for (var i = 0; i < earlyWarningMarker.length; i++) {
    earlyWarningMarker[i].hideOver();
  }
  for (var i = 0; i < smokeMarker.length; i++) {
    smokeMarker[i].hideOver();
    smokeMarker[i].marker2HideFn();
  }
  for (var i = 0; i < chargeMarker.length; i++) {
    chargeMarker[i].hideOver();
  }
  for (var i = 0; i < fireplugMarker.length; i++) {
    fireplugMarker[i].hideOver();
  }
  for (var i = 0; i < waterMarker.length; i++) {
    waterMarker[i].hideOver();
  }
  for (var i = 0; i < electricityMarker.length; i++) {
    electricityMarker[i].hideOver();
  }
  for (var i = 0; i < GPSMarker.length; i++) {
    GPSMarkerr[i].hideOver();
  }
  for (var i = 0; i < videoMarker.length; i++) {
    videoMarker[i].hideOver();
  }
  for (var i = 0; i < keepMarker.length; i++) {
    keepMarker[i].hideOver();
  }
  for (var i = 0; i < fireStationMarker.length; i++) {//微型消防站
    // fireStationMarker[i].hideOver();
  }
  for (var i = 0; i < houseMasterMarker.length; i++) {
    houseMasterMarker[i].hideOver();
  }
  for (var i = 0; i < buildingMarker.length; i++) {
    buildingMarker[i].hideOver();
  }
  for (var i = 0; i < combinedActionMarker.length; i++) {
    combinedActionMarker[i].hideOver();
  }
  for (var i = 0; i < combinedActionPointMarker.length; i++) {
    combinedActionPointMarker[i].hideOver();
  }
  for (var i = 0; i < respondMarker.length; i++) {
    respondMarker[i].hideOver();
    respondMarker[i].marker2HideFn();
  }
  for (var i = 0; i < wallDoorMarker.length; i++) {
    wallDoorMarker[i].hideOver();
  }
  for (var i = 0; i < sentryBoxMarker.length; i++) {
    sentryBoxMarker[i].hideOver();
  }
  for (var i = 0; i < apkMarker.length; i++) {
    apkMarker[i].hideOver();
  }
  for (var i = 0; i < keyPersonMarker.length; i++) {
    keyPersonMarker[i].hideOver();
  }
  for (var i = 0; i < buildingMarker1.length; i++) {
    buildingMarker1[i].hideOver();
  }

  for (var i = 0; i < shoubaoMarker.length; i++) {
    shoubaoMarker[i].hideOver();
  }
  for (var i = 0; i < carPositionMarker.length; i++) {
    carPositionMarker[i].hideOver();
  }
  for (var i = 0; i < personnelPositionMarker.length; i++) {
    personnelPositionMarker[i].hideOver();
  }
  for (var i = 0; i < gongzuorenyuanMarker.length; i++) {
    gongzuorenyuanMarker[i].hideOver();
  }
}
// 显示各设备的所有点位
function showDevTypePiontFn(devType, len) {

  if (devType == 'smoke') {
    for (var i = 0; i < smokeMarker.length; i++) {
      smokeMarker[i].showOver();
      smokeMarker[i].marker2ShowFn();
    }
    if (len == 1) {
      $('.pointPositionBox-smoke').show();
      $('.deviceStatisticsRight').show();
    }
  } else if (devType == 'charge') {
    for (var i = 0; i < chargeMarker.length; i++) {
      chargeMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-charge').show();
      $('.deviceStatisticsRight').show();
    }
  } else if (devType == 'fireplug') {
    for (var i = 0; i < fireplugMarker.length; i++) {
      fireplugMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-fireplug').show();
      $('.deviceStatisticsRight').show();
    }
  } else if (devType == 'water') {
    for (var i = 0; i < waterMarker.length; i++) {
      waterMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-water').show();
      $('.deviceStatisticsRight').show();
    }
  } else if (devType == 'electricity') {
    for (var i = 0; i < electricityMarker.length; i++) {
      electricityMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-electricity').show();
      $('.deviceStatisticsRight').show();
    }
  } else if (devType == 'GPS') {
    for (var i = 0; i < GPSMarker.length; i++) {
      GPSMarkerr[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-GPS').show();
      $('.deviceStatisticsRight').show();
    }
  } else if (devType == 'video') {
    for (var i = 0; i < videoMarker.length; i++) {
      videoMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-video').show();
      $('.deviceStatisticsRight').show();
    }
  } else if (devType == 'keep') {
    for (var i = 0; i < keepMarker.length; i++) {
      keepMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-keep').show();
    }
  } else if (devType == 'fireStation') {
    for (var i = 0; i < fireStationMarker.length; i++) {
      fireStationMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-fireStation').show();
      $('.deviceStatisticsRight').show();
    }
  } else if (devType == 'houseMaster') {
    for (var i = 0; i < houseMasterMarker.length; i++) {
      houseMasterMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-houseMaster').show();
      $('.deviceStatisticsRight').show();
    }
  } else if (devType == 'building') {
    for (var i = 0; i < buildingMarker.length; i++) {
      buildingMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-building').show();
    }
  } else if (devType == 'combinedAction') {
    for (var i = 0; i < combinedActionMarker.length; i++) {
      combinedActionMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-combinedAction').show();
    }
  } else if (devType == 'combinedActionPoint') {
    for (var i = 0; i < combinedActionPointMarker.length; i++) {
      combinedActionPointMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-combinedActionPoint').show();
    }
  } else if (devType == 'respond') {
    for (var i = 0; i < respondMarker.length; i++) {
      respondMarker[i].showOver();
      respondMarker[i].marker2ShowFn();
    }
    if (len == 1) {
      $('.pointPositionBox-respond').show();
      $('.deviceStatisticsRight').show();
    }
  } else if (devType == 'wallDoor') {
    for (var i = 0; i < wallDoorMarker.length; i++) {
      wallDoorMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-wallDoor').show();
    }
  } else if (devType == 'sentryBox') {
    for (var i = 0; i < sentryBoxMarker.length; i++) {
      sentryBoxMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-sentryBox').show();
    }
  } else if (devType == 'apk') {
    for (var i = 0; i < apkMarker.length; i++) {
      apkMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-apk').show();
      $('.deviceStatisticsRight').show();
    }
  } else if (devType == 'keyPerson') {
    for (var i = 0; i < keyPersonMarker.length; i++) {
      keyPersonMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-keyPerson').show();
    }
  } else if (devType == 'gongzuorenyuan') {
    for (var i = 0; i < gongzuorenyuanMarker.length; i++) {
      gongzuorenyuanMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-gongzuorenyuan').show();
    }
  } else if (devType == 'earlyWarning') {
    for (var i = 0; i < earlyWarningMarker.length; i++) {
      earlyWarningMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-earlyWarning').show();
      $('.earlyWarningChartsShow').show();
    }
  } else if (devType == 'wenbao') {
    for (var i = 0; i < buildingMarker1.length; i++) {
      buildingMarker1[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-wenbao').show();
    }
  } else if (devType == 'shoubao') {
    for (var i = 0; i < shoubaoMarker.length; i++) {
      shoubaoMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-shoubao').show();
    }
  } else if (devType == 'carPosition') {
    for (var i = 0; i < carPositionMarker.length; i++) {
      carPositionMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-carPosition').show();
    }
  } else if (devType == 'personnelPosition') {
    for (var i = 0; i < personnelPositionMarker.length; i++) {
      personnelPositionMarker[i].showOver();
    }
    if (len == 1) {
      $('.pointPositionBox-personnelPosition').show();
    }
  }
}